package resoft.jeasyform;

import resoft.jeasyform.core.WindowRunner;
import resoft.jeasyform.util.EnvUtil;

/**
 * <p>main</p>
 * User: albert
 * Date: Aug 27, 2007
 * Time: 6:40:59 PM
 */
public class JForm {
    public static void main(String[] args) {

//        try {
//            Thread.sleep(5 * 1000);
//        } catch (InterruptedException e) {
//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
//        }

        if(args.length==0) {
            System.out.println("usage:\n java resoft.jeasyform.JForm $windowName");
            System.exit(-1);
        } else {
            String jformHome = EnvUtil.getJFormHome();
            if(jformHome==null || jformHome.equals("")) {
                System.out.println("JFORM_HOME not set,or dir not exists");
                System.exit(-1);
            }

            String winName = args[0];
            WindowRunner.openWindow(winName,null);
        }
    }
}
